<%@ page contentType="text/html;charset=utf-8" language="java" pageEncoding="utf-8"%>
<%@ page import="no.kantega.publishing.common.Aksess"%>
<%@ taglib uri="http://www.kantega.no/aksess/tags/aksess" prefix="aksess" %>
<%@ taglib uri="http://www.kantega.no/aksess/tags/commons" prefix="kantega" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<kantega:section id="title">Logg inn!</kantega:section>

<kantega:section id="bodyclass">login</kantega:section>

<kantega:section id="content">
    <fieldset id="Login">
        <h1>Pålogging</h1>
        <p><%--TODO: Legg inn info --%></p>
        <c:set var="loginerrorstyle" value="display:none;"/>
        <c:if test="${loginfailed || blockedUser}">
            <c:set var="loginerrorstyle" value=""/>
            <c:set var="feilmelding" value="Feil brukernavn eller passord"/>
        </c:if>

        <div class="alert alert-danger"  style="${loginerrorstyle}" id="Skjemafeilmelding">${feilmelding}</div>
        <form method="post" action="${pageContext.request.contextPath}/Login.action" id="Loginform" class="form">
            <div class="form-group row">
                <div class="col-xs-12 col-sm-2">
                    <label for="brukernavn" title="Brukernavn">Brukernavn:</label>
                </div>
                <div class="col-xs-12 col-sm-4">
                    <input id="brukernavn" type="text" name="j_username" value="${username}" class="form-control" placeholder="Brukernavn" tabindex="1">
                </div>
            </div>
            <div class="form-group row">
                <div class="col-xs-12 col-sm-2">
                    <label for="passord">Passord: </label>
                </div>
                <div class="col-xs-12 col-sm-4">
                    <input id="passord" type="password" name="j_password" tabindex="2" class="form-control" placeholder="Passord">
                </div>
            </div>

            <div class="form-group row">
                <div class="col-xs-12">
                    <input type="submit" value="Logg inn" class="btn btn-default" tabindex="3">
                </div>

            </div>

            <input type="hidden" name="j_domain" value="<%=Aksess.getDefaultSecurityDomain()%>">
            <input type="hidden" name="redirect" value="${redirect}">

        </form>
    </fieldset>
</kantega:section>
<aksess:include url="/WEB-INF/jsp$SITE/include/design/frontpage.jsp"/>
